<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!--{include file='comm/header.tpl'}-->
<title><!--{$itemCategoryName}--></title>
<script type="text/javascript">
	
	//编辑货区
	function doEdit(cartonID,pageIndex){
		window.open("/quanliadmin/app/wms/carton.pscript?operFlg=5&cartonID="+cartonID+"&pageIndex="+pageIndex,target='_blank');
	}
	//页面跳转操作
	function doJumpAction(pageAll){
		var pageIndex = document.getElementById("jumpPageIndex").value;
		if(pageIndex<1){
			doSearch(1);
		}else if(pageIndex>pageAll){
			doSearch(pageAll);
		}else{
			doSearch(pageIndex);
		}
	}
	function doSearch(pageIndex){
		self.location = "/quanliadmin/app/wms/carton.pscript?operFlg=1&pageIndex="+pageIndex;
	}
	//添加货架
	function addItem(itemCategoryName,itemCategoryID){
		window.open("/quanliadmin/app/maintain/categoryitem.pscript?itemCategoryID="+itemCategoryID+"&itemCategoryName="+itemCategoryName,target='_blank');
	}
	//使用标志
	function updateUseFlg(itemID,pageIndex,itemCategoryID,useFlg){
		var data = [itemID,pageIndex,itemCategoryID,useFlg];
		xajax_startEdit(data,1);
	}
	
</script>
</head>
<!--{php}-->
	global $xajax;
	$xajax->printJavascript( "/framework/xajax" );
<!--{/php}-->
<body>
	<div style="width:100%">
		<!--{include file='comm/menu.tpl'}-->
		<div id="body_content" align="center">
			<table width="80%" class="comm_header_table">
				<tr>
					<td style="text-align:center;width:90%;height:50px;">
						<h1><!--{$itemCategoryName}--></h1>
					</td>
					<td style="width:10%">
						<input type="hidden" id="pageIndex" value="<!--{$pageIndex}-->"name="pageIndex" size="2">
						<!--{if $ps_category_edit == 1}-->
							<input type="button" style="height:25px;width:60px;" value="添加" onclick="addItem('<!--{$itemCategoryName}-->','<!--{$datas.0->itemCategoryID}-->')">
						<!--{/if}-->
					</td>
				</tr>
			</table>
			<table width="80%" class="comm_table" id="html_list">
				<tr>
					<th style="width:10%;">编号</th>
					<th style="width:40%;">名称</th>
					<th style="width:15%;">排序</th>
					<th style="width:15%;">使用标志</th>
					<th style="width:20%;">操作</th>
				</tr>
				<!--{foreach from=$datas item=line}-->
				<tr>
					<td style="text-align:right;"><!--{$line->itemID}--></td>
					<td style="text-align:left;"><!--{$line->itemName}--></td>
					<td style="text-align:right;"><!--{$line->sortorder}--></td>
					<td style="text-align:center;" id='log' class="td_wrap">
						<!--{if $ps_category_edit == 1}-->
							<!--{if $line->useFlg == 1}-->
								<div class="relative">
									<a href="javascript:void(0);" onclick="delete_pop(this,'您确认禁用吗?');">启用</a>
									<div class="absolute hide">
										<p></p>
										<a onclick="updateUseFlg('<!--{$line->itemID}-->','<!--{$pageIndex}-->','<!--{$line->itemCategoryID}-->',0);" href="javascript:void(0);">确认</a>
										<a onclick="cancal_delete_pop();" href="javascript:void(0);">取消</a>
									</div>
								</div>
							<!--{else}-->
								<div class="relative">
									<a href="javascript:void(0);" onclick="delete_pop(this,'您确认启用吗?');">禁用</a>
									<div class="absolute hide">
										<p></p>
										<a onclick="updateUseFlg('<!--{$line->itemID}-->','<!--{$pageIndex}-->','<!--{$line->itemCategoryID}-->',1);" href="javascript:void(0);">确认</a>
										<a onclick="cancal_delete_pop();" href="javascript:void(0);">取消</a>
									</div>
								</div>
							<!--{/if}-->
						<!--{else}-->
							<!--{if $line->useFlg == 1}-->
								启用
							<!--{else}-->
								禁用
							<!--{/if}-->		
						<!--{/if}-->
					</td>
					<td style="text-align:center;" id="log">
						<!--{if $ps_category_edit == 1}-->
							<a href="/quanliadmin/app/maintain/categoryitem.pscript?itemID=<!--{$line->itemID}-->&itemCategoryID=<!--{$datas.0->itemCategoryID}-->&itemCategoryName=<!--{$itemCategoryName}-->" target="_blank">编辑</a>
						<!--{/if}-->
					</td>
				</tr>
				<!--{/foreach}-->
			</table>
			<div style="width:90%">
				<!--{if ($footHTML=='')}-->&nbsp;<!--{else}--><!--{$footHTML}--><!--{/if}-->
			</div>

		</div>
		<!--{include file='comm/footer.tpl'}-->
	</div>
</body>